<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/pop-ups.css"><!--弹出层-->
    <link rel="stylesheet" href="../../css/icon-font.css"/><!--图标-->
    <link rel="stylesheet" href="../../css/share.css"/><!--分享-->
    <title>行业数据详细</title>
    <style>
        .industry-chart-content {
            min-height: 4.4rem;
            padding-top: 0.28rem;
        }

        .table-detail-content {
            padding: 0.2rem 0.32rem 0.1rem 0.32rem
        }

        .table-list-collect{
            width:0.8rem;height:0.4rem;background-color: #F4F5F9;border-radius: 2px;text-align: center;
        }

        .table-list-isc{
            color: #2C68FF;
        }

        .table-list-noc{
            color:rgb(191,191,191)
        }
    </style>
</head>
<body>

<div class="flex-column ff400 h-100-p bg-white">
    <!--状态栏-->
    <div class="placeholder-top">
        <!--状态栏-->
        <div class="bg-main status-bar"></div>
        <!--导航栏-->
        <div class="bg-main nav-bar flex-row justify-content-between c-white align-items-center">
            <div class="left-bar" onclick="clickBack()">
                <span class="iconfont iconfanhui1 fs16"></span>
            </div>
            <div class="center-bar fs16 ff500 industry-name line1"></div>

            <div class="right-bar">
                <!--<span class="iconfont iconfenxiang1 fs16"></span>-->
            </div>
        </div>
    </div>

    <div class="table-detail-content flex-1 scoll-y"></div>


</div>
<div class="prompt-tip-wrap" style="display: none"></div>
<div class="prompt-tip-triangle" style="display: none"></div>

</body>
<!--这四个文件的引入必须按照顺序-->
<script src="../../js/dict.js"></script>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/checkJsBridge.js"></script>
<script src="../../js/utils.js"></script>
<script src="../../js/api.js"></script>
<!--这四个文件的引入必须按照顺序-->
<script src="../../js/date.js"></script>
<script src="../../js/dateConversion.js"></script>

<script src="../../js/icon-font.js"></script><!--用于彩色字体图标-->
<script src="../../js/template.js"></script>
<!--echarts-->
<script src="../../js/echarts.min.js"></script>
<script src="../../js/table-list.js"></script>

<script>
  let pm = {
    appName:'',
    menuCode:'',
    isLogin:false
  }

  function initPage(params) {
    //状态栏自适应
    Utils.sbhAdaptive()
    pm.isLogin = !user.isGuest
    pm.appName = params.appName
    pm.menuCode = params.menuCode
    findCollectStatus()
  }
  function reLoadPage(){
    pm.isLogin = !user.isGuest
    findCollectStatus()
  }

  function qrySubTopicDataSet(subtopicCode, menuCode) {
    // 获取图表数据信息
    Server.tableDetail.qrySubTopicDataSet({
      'data': [],
      'isFirstAccess': '1',
      'subtopicCode': subtopicCode,
    }).then(function (data) {
      data.data.subtopicTitle = pm.appName ? pm.appName : data.data.subtopicTitle
      $('.industry-name').html(data.data.subtopicTitle)
      $('.table-detail-content').html(`<div  id="childId_${subtopicCode}" class="industry-data-item"></div>`)
      // 处理图表信息
      dealChart(data.data, menuCode, 1)
    })
  }

  function findCollectStatus(){
    if(pm.isLogin){
      Promise.all([Server.tableDetail.findCollectStatus({
        collectionObjectId: pm.menuCode,
        objectSource: '5',
      }),Server.tableDetail.qrySubTopicDataSet({
        'data': [],
        'isFirstAccess': '1',
        'subtopicCode': pm.menuCode,
      })]).then(([data1,data2]) => {
        data1.isCollect === 0 ? data2.data.collect = '0' : data2.data.collect = '1'
        data2.data.subtopicTitle = pm.appName ? pm.appName : data2.data.subtopicTitle
        $('.industry-name').html(data2.data.subtopicTitle)
        $('.table-detail-content').html(`<div  id="childId_${pm.menuCode}" class="industry-data-item"></div>`)
        // 处理图表信息
        dealChart(data2.data, pm.menuCode, 1)
      })
    }else{
      qrySubTopicDataSet(pm.menuCode, pm.menuCode)
    }
  }

</script>
</html>
